package com.ruicar.afs.cloud.batch.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ruicar.afs.cloud.batch.enums.BatchType;
import com.ruicar.afs.cloud.batch.enums.ErrorNoticeType;
import com.ruicar.afs.cloud.batch.enums.HolidayMode;
import com.ruicar.afs.cloud.batch.enums.SystemStatus;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import lombok.Data;

@Data
@TableName("afs_batch_info")
public class AfsBatchInfo {
    @TableId(type = IdType.INPUT)
    private String systemName ;
    private String lastWorkDay ;
    private String batchDate ;
    private String lastBatchDate ;
    private SystemStatus systemStatus;
    private HolidayMode holidayMode;
    private Integer liveThreadNum;
    /** 调用服务名 */
    private String targetServiceName ;
    /** 异常通知类型 */
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    @JSONField(serializeUsing = AfsEnumSerializer.class,deserializeUsing = AfsEnumDeserializer.class)
    private ErrorNoticeType errorNoticeType ;
    /** 异常配置 */
    private String errorNoticeConfig ;
    /**批量运行标记 ALL-所有，DE-日终，DB-日初*/
    private BatchType batchType;
}
